package com.sca.bussiness.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

import java.io.Serializable;
import java.util.Map;

/**
 * @author liuxianfei
 * @since 2020/11/20 12:01
 */
@Slf4j
@Setter
@Getter
public abstract class AbstractScheduleJob {

    /**
     * 参数
     */
    protected Map<String, Serializable> params;

    /**
     * 入口
     *
     * @param params
     */
    public void executeEntry(Map<String, Serializable> params) {
        log.info("schedule：[{}]，params：[{}]", getClass().getCanonicalName(), params);
        execute(params);
    }

    protected abstract void execute(Map<String, Serializable> params);

}
